<?php require_once("includes/security.php"); ?>
<?php 		
require_once("includes/initializeSession.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/style.css">
<title>קליניקה נטורופתית</title>
 <script language="JavaScript" type="text/javascript" src="Script/jquery-1.9.1.js"></script>
 <script language="JavaScript" type="text/javascript" src="Script/functions.js"></script>
</head>

<body>
<container id="container">
  <?php require("header.php"); ?>
      <content id="content">
      <contentTitle id="contentTitle">
      מי אנחנו?
      </contentTitle>
      <contentText id="contentText">
      <?php if (isset($_SESSION['UserName']))
		  {
			  		
require("includes/openConnection.php");
			$result = mysql_query("SELECT * FROM users WHERE username='{$_SESSION['UserName']}'")or die ('בעיה במציאת היוזר'.mysql_error());
				if(mysql_num_rows($result) > 0)
				{
					$row = mysql_fetch_array($result);
		
?> 						

         <h1  style=" color:#F00"  > פרטי המשתמש	</h1>           
       
     <table >
     <tr bgcolor="#FFFFFF"><td>שם פרטי</td><td>שם משפחה</td><td>מייל</td><td>טלפון</td><td>כתובת</td></tr>
     <tr >
     <td><input type="text" id="fn" value= <?php echo $row['firstname']; ?>  /></td>
     <td><input type="text" id="ln" value=<?php echo $row['lastname']; ?>  /></td>
     <td><input type="text" id="email" value=<?php echo $row['email']; ?>  /></td>
     <td><input type="text" id="phone" value=<?php echo $row['phone']; ?>  /></td>
     <td><input type="text" id="address"  value=<?php echo $row['address']; ?> /></td>
     </tr>
     </table>        

   
      
      
      <input type="submit" onclick="updateDetails();" name="עדכון פרטים" value="עדכון פרטים" />
      
       <?php
				}
			 
		  }
		  require("includes/closeConnection.php");
			 ?>  
</contentText>
      </content>
</container>
    
     
    
</body>
</html>
